Skip to content

perf(render): reuse serialized viewer ids#68

Merged
TypeThe0ry merged 2 commits into
devfrom
codex/perf-render-viewer-serialization
Jul 16, 2026
Merged

perf(render): reuse serialized viewer ids#68
TypeThe0ry merged 2 commits into
devfrom
codex/perf-render-viewer-serialization

Conversation

@TypeThe0ry

Copy link
Copy Markdown
Member

Pure performance scope

This candidate changes only TableRenderSnapshotFactory viewer-ID preprocessing and an exact behavior-preservation test. It does not include the closed #57 occupied-seat optimization and does not change game rules, visibility policy, packet behavior, timers, interactions, or supported platforms.

Candidate

Each distinct viewer UUID is serialized exactly once per create() call into a private (UUID id, String serializedId) record. The records are sorted by serializedId, preserving the existing Comparator.comparing(UUID::toString) order exactly. Membership signatures append the cached strings, while exclusion lists retain the original UUID objects and ordering.

The test covers:

  • duplicate viewer UUID removal before serialization
  • a high-bit UUID whose UUID.compareTo ordering differs from its serialized string ordering
  • exact exclusion UUID order
  • exact delimiter-free membership signature characters
  • occupied-but-offline and empty-viewer behavior

Evidence policy

No performance claim is made from source inspection. GitHub Build/Test must pass before the trusted base-owned snapshot A/B gate is enabled. Only PASS_OPTIMIZED permits readying and expected-head squash merge; inconclusive or regressed evidence closes the candidate without merge.

No Gradle, JMH, test, or server workload was run locally.

@TypeThe0ry TypeThe0ry added performance-snapshot Use the viewer snapshot performance profile performance-ab Run the base-owned paired performance gate labels Jul 16, 2026 — with ChatGPT Codex Connector
@TypeThe0ry TypeThe0ry removed the performance-ab Run the base-owned paired performance gate label Jul 16, 2026
@Arbousier1
Arbousier1 force-pushed the codex/perf-render-viewer-serialization branch from d679e16 to cf0d497 Compare July 16, 2026 07:39
@TypeThe0ry TypeThe0ry added the performance-ab Run the base-owned paired performance gate label Jul 16, 2026 — with ChatGPT Codex Connector
@TypeThe0ry
TypeThe0ry marked this pull request as ready for review July 16, 2026 08:35
@TypeThe0ry
TypeThe0ry merged commit fbf3953 into dev Jul 16, 2026
16 checks passed
@Arbousier1
Arbousier1 deleted the codex/perf-render-viewer-serialization branch July 16, 2026 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance-ab Run the base-owned paired performance gate performance-snapshot Use the viewer snapshot performance profile

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants